﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
<link href="~/lib/layui/css/layui.css" rel="stylesheet" />
<script src="~/lib/layui/layui.js"></script>
@* <script src="~/js/js.cookie.js"></script>
<script src="~/js/moment.js"></script> *@
<script src="~/lib/jquery/dist/jquery.js"></script>




<!DOCTYPE html>
<html>
<style>
    #menucolor {
        background-color: white;
    }
</style>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>IMES</title>
</head>
<body>
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header layui-#1e9fff layui-bg-blue">
            <div class="layui-logo layui-hide-xs layui-bg-blue">IMES</div>
            <!-- 头部区域（可配合layui 已有的水平导航） -->
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item layui-hide-xs">
                    【商业版】全套源码出售，点击这里联系 <span style="color:red;font-size:30px;">王丹青</span>教授
                </li>
            </ul>


            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item layui-hide-xs"><a href="" onclick="window.close()">个人信息</a></li>
                <li class="layui-nav-item layui-hide-xs"><a class="" href="/">退出</a></li>
                <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                    <a href="javascript:;">
                        <img src="/微信图片_20241113111607.jpg" class="layui-nav-img">
                        当前用户：<span id="name"></span>
                    </a>
                </li>
                <li class="layui-nav-item layui-hide-xs">
                    <h3></h3>
                </li>
            </ul>
        </div>

        <div class="layui-side">
            <div class="layui-side-scroll ">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree" lay-filter="test">
                    @*  <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="/">登录</a>
                    </li> *@

                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">系统设置</a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a href="#">用户管理</a>
                                <dl class="layui-nav-child">

                                    <dd><a href="#" onclick="setIFrame(2)">用户显示</a> </dd>
                                </dl>
                            </dd>
                            <dd><a href="#" onclick="setIFrame(7)">部门管理</a></dd>
                            <dd>

                                <a href="#">权限管理</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="#" onclick="setIFrame(3)">权限新增</a> </dd>
                                    <dd><a href="#" onclick="setIFrame(4)">权限显示</a> </dd>
                                </dl>
                            </dd>
                            <dd>
                                <a href="#">角色管理</a>
                                <dl class="layui-nav-child">

                                    <dd><a href="#" onclick="setIFrame(5)">角色显示</a> </dd>
                                </dl>
                            </dd>
                            <dd>
                                <a href="#">日志管理</a>
                                <dl class="layui-nav-child">
                                    <dd><a href="#" onclick="setIFrame()">用户日志</a> </dd>
                                </dl>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">基础数据</a>
                        <dl class="layui-nav-child">
                            <dd><a href="#" onclick="setIFrame(6)">工艺路线</a></dd> 
                            <dd><a href="#" onclick="setIFrame(19)">仓库管理</a></dd>
                            <dd><a href="#" onclick="setIFrame(20)">物料清单(Tree)</a></dd>
                            <dd><a href="#" onclick="setIFrame(51)">部门管理(Tree)</a></dd>
                            <dd><a href="#" onclick="setIFrame(8)">单位管理</a></dd>
                            <dd><a href="#" onclick="setIFrame(9)">不良品项</a></dd>
                            <dd><a href="#" onclick="setIFrame(25)">不良品项分布</a></dd>
                            <dd><a href="#" onclick="setIFrame(10)">工序</a></dd>
                            <dd><a href="#" onclick="setIFrame(12)">车间设置</a></dd>
                            <dd><a href="#" onclick="setIFrame(18)">产品管理</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">看板管理
                        <dl class="layui-nav-child">
                            <dd><a href="#" onclick="setIFrame(54)">工单执行进度</a></dd>

                        </dl>
                    </li>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">报表管理</a>
                        <dl class="layui-nav-child">
                            <dd><a href="#" onclick="setIFrame(52)">生产报表</a></dd>
                            <dd><a href="#" onclick="setIFrame(53)">库存收发明细</a></dd>
                            <dd><a href="#" onclick="setIFrame(55)">库存余额</a></dd>
                           
                        </dl>
                    </li>
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="javascript:;">生产管理</a>
                        <dl class="layui-nav-child">
                            <dd><a href="#" onclick="setIFrame(13)">销售订单</a></dd>
                            <dd><a href="#" onclick="setIFrame(14)">生产计划</a></dd>
                            <dd><a href="#" onclick="setIFrame(15)">装配工单</a></dd>
                            <dd><a href="#" onclick="setIFrame(16)">工单</a></dd>
                            <dd><a href="#" onclick="setIFrame(17)">任务</a></dd>
                            <dd><a href="#" onclick="setIFrame(21)">报工</a></dd>
                            <dd><a href="#" onclick="setIFrame(22)">完工单</a></dd>
                            <dd><a href="#" onclick="setIFrame(101)">入库单</a></dd>
                            <dd><a href="#" onclick="setIFrame(102)">出库单</a></dd>
                        </dl>
                    </li>

                    <li class="layui-nav-item"><a href="javascript:;">关于本系统</a></li>

                </ul>
            </div>
        </div>
        <div class="layui-body">

            <iframe src="" id="iframeShow" width="100%" height="100%" frameborder="no" border="0"></iframe>

        </div>
    </div>
</body>
</html>
<script>

    function setIFrame(flag) {

        switch (flag) {
            case 54:
                $("#iframeShow").attr("src", "http://localhost:8075/webroot/decision/view/form?viewlet=Form3.frm");//工单执行看板
                break;
            case 111:
                $("#iframeShow").attr("src", "/Production/ProductionList");//测试
                break;
            case 112:
                $("#iframeShow").attr("src", "/Worksheets/WorksheetAdd");//测试2
                break;
            case 2:
                $("#iframeShow").attr("src", "/Users/UsersAddView");//用户管理
                break;
            case 7:
                $("#iframeShow").attr("src", "/Department/DepartmentListView");//部门管理
                break;

            case 3:
                $("#iframeShow").attr("src", "/Users/PermissionAddView");//权限新增
                break;
            case 4:
                $("#iframeShow").attr("src", "/Users/PermissionShowView");//权限显示
                break;
            case 5:
                $("#iframeShow").attr("src", "/Users/RoleShowView");//角色管理
                break;
            case 10:
                $("#iframeShow").attr("src", "/Process/ProcessAdd");//工序管理
                break;
            case 13:
                $("#iframeShow").attr("src", "/Orders/OrderShowView");//销售订单
                break; 
           
            case 9:
                $("#iframeShow").attr("src", "/Defective/DefectivesInfoView");//不良品管理
                break;
            case 19:
                $("#iframeShow").attr("src", "/Department/WarehouseListView");//仓库
                break;
            case 6:
                $("#iframeShow").attr("src", "/ProcessRoute/ProcessRouteList");//工艺路线
                break;
            case 20:
                $("#iframeShow").attr("src", "/Materials/MaterialsInfoView");//物料树形
                break;
            case 18:
                $("#iframeShow").attr("src", "/Product/ProductInfoView");//产品管理 
                break; 
            case 14:
                $("#iframeShow").attr("src", "/Production/ProductionList");//生产计划
                break;
            case 15:
                $("#iframeShow").attr("src", "/Assembly/AssemblyAdd");//装配工单
                break;
            case 16:
                $("#iframeShow").attr("src", "/Worksheets/WorksheetList");//工单
                break;
            case 51:
                $("#iframeShow").attr("src", "/Department/DepartmentListView");//工单
                break;
            case 52:
                $("#iframeShow").attr("src", "http://localhost:8075/webroot/decision/view/report?viewlet=WorkBook4.cpt");//工单
                break;

            case 53:
                $("#iframeShow").attr("src", "http://localhost:8075/webroot/decision/view/report?viewlet=WorkBook2.cpt");//库存收发明细
                break;
            case 54:
                $("#iframeShow").attr("src", "http://localhost:8075/webroot/decision/view/report?viewlet=WorkBook3.cpt");//库存余额
                break;
                 case 101:
                $("#iframeShow").attr("src", "/InboundOrder/InboundOrderShowView");//入库单
                break;
            case 102:
                $("#iframeShow").attr("src", "/OutboundOrder/OutboundOrderShowView");//出库单
                break;
                 

        }
    }

    //就绪函数
    $(function () {
        setInterval(time_str, 1000)
        var username = localStorage["username"];
        $("#name").html(username);
    })
    //时间函数-北京时间
    function time_str() {
        var date_now = new Date();
        var year = date_now.getFullYear();
        var month = (date_now.getMonth() + 1).toString().padStart(2, "0");
        var date = date_now.getDate().toString().padStart(2, "0");
        var time = date_now.toLocaleTimeString();
        var res = year + "年" + month + "月" + date + "日" + "" + time;

        $("h3").html(res)
    }

</script>
